package clazz.extendstest;

import com.alibaba.fastjson.JSON;

import java.util.logging.Logger;

/**
 * @Description：
 * @Author：LiDong
 * @Create：2021/1/7
 * @Version：1.0.0
 */
public class Men extends People {

    private static final Logger logger = Logger.getLogger(String.valueOf(Men.class));

    private String name;

    private String flag;

    static {
        logger.info("我是Men的静态方法！");
    }

    public Men() {
        super();
    }

    public void sayWorld() {
        logger.info("我是男人！");
    }

    @SuppressWarnings("all")
    public Men(String type, int pno, String name, String name1, String flag) {
        super(type, pno, name);
        this.name = name1;
        this.flag = flag;
    }

    public static void main(String[] args) {
        logger.info("开始测试=====》");
        Men men = new Men();
        men.flag = "men";
        men.name = "张三";
        logger.info(JSON.toJSONString(men));

        men.sayWorld();
        men.sayWord();
        men.showFlag();

    }

    @Override
    public String toString() {
        return "Men{" +
                "name='" + name + '\'' +
                ", flag='" + flag + '\'' +
                ", name='" + name + '\'' +
                '}';
    }


    @Override
    public void sayWord() {
        System.out.println("Men say hellow!");
    }

    /**
     * 调用弗雷的方法
     */
    protected void testOne() {
        sayWord();
        super.sayWord();
    }
}
